﻿CREATE TABLE [jnl].[JournalLine] (
    [JournalId]              INT             NOT NULL,
    [JournalLineNumber]      INT             NOT NULL,
    [CurrencyId]             SMALLINT        NOT NULL,
    [LegalEntityId]          INT             NOT NULL,
    [CostCentreId]           INT             NOT NULL,
    [UnitId]                 INT             NOT NULL,
    [AccountId]              SMALLINT        NOT NULL,
    [ClientId]               INT             NOT NULL,
    [SecurityId]             INT             NOT NULL,
    [ContractId]             INT             NOT NULL,
    [AmountCCY]              NUMERIC (18, 2) NOT NULL,
    [AmountGBP]              NUMERIC (18, 2) NOT NULL,
    [JournalLineDescription] NVARCHAR (200)  NULL,
    PRIMARY KEY CLUSTERED ([JournalId] DESC, [JournalLineNumber] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF)
);

